package com.max.back.demo.api;

import com.max.back.common.http.ResponseResult;
import com.max.back.demo.entity.Reapp;
import com.max.back.demo.form.SickDrugForm;
import com.max.back.demo.service.ReappSer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
/**
 *退药申请表控制器
 */
@CrossOrigin
@RestController
@RequestMapping("/api/reapp")
public class ReappCtl {
    /**
     *退药申请服务接口
     */
    @Autowired
    private ReappSer ser;
    @PostMapping("/select")
    public ResponseResult<List<Reapp>> select(@RequestBody SickDrugForm form) {
        List<Reapp> list = ser.getreapp(form.getId());
        return ResponseResult.getSuccessResult(list);
    }
}
